from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import OrderViewSet

router = DefaultRouter()
router.register(r'orders', OrderViewSet)

urlpatterns = [
    path('', include(router.urls)),
    # 删除下面这行额外的create路由
    # path('orders/create/', OrderViewSet.as_view({'post': 'create'}), name='order-create'),
]